﻿
using BCCommon;
using BCCommon.Enums;
using BCData.TMS.WorkingCompany;
using BCDto.Sim.Admin.Admin;
using BCDto.TMS.WorkingCompany;
using BCEntity.TMS.WorkingCompany;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BCService.TMS.WorkingCompany
{
	/// <summary>
	/// 劳务公司
	/// </summary>
	public interface IWorkingCompanyService
	{
		#region  成员方法
		/// <summary>
		/// 是否存在此记录
		/// </summary>
		/// <param name="workingCompanyId">劳务公司Id</param>
		bool Exists(long workingCompanyId);
        /// <summary>
        /// 添加劳务公司
        /// </summary>
        /// <param name="admin"></param>
        /// <param name="requestDto">劳务公司信息</param>
        WorkingCompanyDto Add(WorkingCompanyRequestDto requestDto, AdminDto admin);
        /// <summary>
        /// 更新劳务公司
        /// </summary>
        /// <param name="admin"></param>
        /// <param name="putDto">劳务公司信息</param>
        WorkingCompanyDto Update(WorkingCompanyPutDto putDto, AdminDto admin);
        /// <summary>
        /// 删除劳务公司
        /// </summary>
        /// <param name="workingCompanyId">劳务公司Id</param>
        bool Delete(long workingCompanyId);
		/// <summary>
		/// 根据区县编码获取劳务公司列表
		/// </summary>
		/// <param name="countyCode">区县编码</param>
		/// <returns></returns>
		IEnumerable<WorkingCompanyDto> GetListByCountyCode(string countyCode);

        /// <summary>
        /// 获取劳务公司
        /// </summary>
        /// <param name="workingCompanyId">劳务公司Id</param>
        WorkingCompanyDto Get(long workingCompanyId);
		/// <summary>
		/// 获取劳务公司列表
		/// <param name="admin"></param>
		/// <param name="departmentId">部门Id</param>
		/// <param name="workingCompanyName">劳务公司名字</param>
		/// </summary>
		IEnumerable<WorkingCompanyDto> GetOnlyList(AdminDto admin, long? departmentId, string workingCompanyName);
 
		/// <summary>
		/// 获取劳务公司分页列表
		/// </summary>
		/// <param name="admin"></param>
		/// <param name="departmentId">部门Id</param>
		/// <param name="workingCompanyName">劳务公司名字</param>
		/// <param name="start">开始时间</param>
		/// <param name="end">结束时间</param>
		/// <param name="sortName">排序字段</param>
		/// <param name="ascending">升序</param>
		/// <param name="pageIndex">当前页码</param>
		/// <param name="pageSize">劳务公司每页数据条数</param> 
		/// <returns></returns>
		PageableList<WorkingCompanyDto> Query(AdminDto admin, long? departmentId, string workingCompanyName, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);

        /// <summary>
        /// 启用禁用手动指派
        /// </summary>
        /// <param name="workingCompanyId"></param>
        /// <param name="isEnable"></param>
        /// <param name="admin"></param>
        void EnabledManualAssign(long workingCompanyId, bool isEnable, AdminDto admin);
        #endregion  成员方法
    }
}